/******************** 变量 ********************/
$lv-operation-menu-color: $text-color;
$lv-operation-menu-item-color: $text-color-link;
$lv-operation-menu-item-color-hover: $primary-color-hover;
$lv-operation-menu-item-color-focus: $primary-color-active;
$lv-operation-menu-item-color-active: $primary-color-active;

/******************** 组件 ********************/
.lv-operation-menu {
  display: flex;
  align-items: center;
  color: $lv-operation-menu-color;
  font-size: $font-size-base;
  font-family: $font-family;
  line-height: $line-height-base;

  &-item {
    display: block;
    margin-left: $margin-md;
    padding: 0;
    cursor: pointer;

    &:first-child {
      margin-left: 0;
    }

    &:not([disabled]) {
      &:hover {
        text-decoration: none;
      }
    }

    &.lv-button.lv-button-size-auto {
      display: flex;
      align-items: center;
      height: 0.22rem;
    }
  }

  &-dropdown,
  &-item-dropdown {
    &:not(.lv-dropdown-disabled) {
      color: $lv-operation-menu-item-color;
      vertical-align: middle;

      .lv-operation-menu-text-icon {
        margin-left: $margin-xs;
      }

      .lv-operation-menu-dropdown-more {
        @include icon-size-md;

        color: $icon-color;
      }

      &:hover {
        color: $lv-operation-menu-item-color-hover;
        text-decoration: none;
        cursor: pointer;

        .lv-operation-menu-dropdown-more {
          color: $icon-color-hover;
        }
      }

      &:focus {
        color: $lv-operation-menu-item-color-focus;

        .lv-operation-menu-dropdown-more {
          color: $icon-color-active;
        }
      }

      &:active {
        color: $lv-operation-menu-item-color-active;

        .lv-operation-menu-dropdown-more {
          color: $icon-color-active;
        }
      }

      &:disabled,
      &[disabled] {
        .lv-operation-menu-dropdown-more {
          color: $icon-color-disabled;
        }
      }
    }
  }

  &-item-dropdown {
    margin-left: $margin-xs;

    &:first-child {
      margin-left: 0;
    }
  }

  &-item + &-dropdown,
  &-item + &-item-dropdown,
  &-item-dropdown + &-dropdown {
    margin-left: $margin-md;
  }
}

.lv-operation-menu-item-dropdown-icon,
.lv-operation-menu-item-icon {
  margin-right: $margin-xs;
}

.lv-operation-menu-dropdown-panel.lv-dropdown-panel li > .lv-dropdown-item > span:not(.lv-overflow) {
  white-space: nowrap;
  word-break: keep-all;
}
